<!-- Head头部组建 -->
<template>
  <div class="nav flex j-s a-c">
    <div class="logo flex j-s a-c">
      <div class="cards">
        <span v-for="n in 16" :key="n"> </span>
      </div>
      <!-- <div class="icon">
        <span></span>
        <span></span>
        <span></span>
        <span></span>
        <span></span>
        <span></span>
        <span></span>
        <span></span>
      </div> -->
      <div>Cloud Album</div>
    </div>
    <div class="viewModel">
      <el-menu
        :router="true"
        :default-active="$route.path"
        class="el-menu-demo"
        mode="horizontal"
      >
        <el-menu-item index="/home/photo">相片</el-menu-item>
        <el-menu-item index="/home/album">相册</el-menu-item>
        <el-menu-item index="/home/upload">上传</el-menu-item>
      </el-menu>
    </div>
    <div class="search">
      <SearchInput></SearchInput>
    </div>
  </div>
</template>

<script>
import SearchInput from "../components/SearchInput";
export default {
  data() {
    return {};
  },
  components: {
    SearchInput,
  },
  methods: {},
};
</script>

<style  scoped>
.nav {
  /* background-color: #fff;
  background-image: linear-gradient(to left, #a8edea 0%, #fed6e3 100%); */
  background-color: rgb(247, 247, 247);
  border-bottom: 2px solid rgb(10, 181, 223);
}
.logo {
  font-family: "Gill Sans", "Gill Sans MT", Calibri, "Trebuchet MS", sans-serif;
  font-size: 30px;
  padding: 0 10px;
}
.icon {
  width: 60px;
  height: 61px;
  border-radius: 0%;
  background-color: rgb(249, 249, 249);
  font-size: 30px;
  padding: 5px;
  position: relative;
  display: flex;
  justify-content: center;
  box-sizing: border-box;
}

.icon span {
  position: absolute;
  width: 22.5%;
  height: 37.5%;
  border-radius: 50% / 30%;
  transform-origin: center 105%;
  transform: rotate(calc((var(--n) - 1) * 45deg));
  background-color: var(--c);
  mix-blend-mode: multiply;
}
.icon span:nth-child(1) {
  /*设置第一瓣花瓣展开时不旋转*/
  --n: 1;
  /*设置第一瓣花瓣展开时旋转*/
  /*--n: 9;*/
  --c: rgba(243, 156, 18, 0.7);
}

.icon span:nth-child(2) {
  --n: 2;
  --c: rgba(241, 196, 15, 0.7);
}

.icon span:nth-child(3) {
  --n: 3;
  --c: rgba(46, 204, 113, 0.7);
}

.icon span:nth-child(4) {
  --n: 4;
  --c: rgba(27, 188, 155, 0.7);
}

.icon span:nth-child(5) {
  --n: 5;
  --c: rgba(65, 131, 215, 0.7);
}

.icon span:nth-child(6) {
  --n: 6;
  --c: rgba(102, 51, 153, 0.7);
}

.icon span:nth-child(7) {
  --n: 7;
  --c: rgba(155, 89, 182, 0.7);
}

.icon span:nth-child(8) {
  --n: 8;
  --c: rgba(242, 38, 19, 0.7);
}

.icon:hover span {
  animation: rotating 2s ease-in-out forwards;
}
@keyframes rotating {
  from {
    transform: rotate(0);
  }
  to {
    transform: rotate(calc((var(--n) - 1) * 45deg));
  }
}
.cards {
  width: 60px;
  height: 60px;
  margin-right: 8px;
}

.cards,
.cards > * {
  box-sizing: border-box;
}
.cards span {
  width: 28px;
  height: 9px;
  background-color: lightgreen;
  position: absolute;
  top: 25px;
  left: 100px;
  border: 0.2px solid dimgray;
  border-radius: 0.3px 0.8px 0.8px 0.3px;
}

.cards span::before {
  content: "";
  position: absolute;
  height: 100%;
  width: 20%;
  background-color: white;
  right: 0;
  border-radius: 0 0.6em 0.6em 0;
  border-left: 0.2em solid silver;
}

.cards span::after {
  content: "";
  position: absolute;
  height: 6px;
  width: 1px;
  background-color: silver;
  left: 19px;
  top: 1px;
  box-shadow: 1px 0 0 -1px silver;
}
.cards span {
  transform-origin: left;
  transform: rotate(calc((var(--n) - 1) * 22.5deg));
}
.cards span:nth-child(1) {
  --n: 1;
}

.cards span:nth-child(2) {
  --n: 2;
}

.cards span:nth-child(3) {
  --n: 3;
}

.cards span:nth-child(4) {
  --n: 4;
}

.cards span:nth-child(5) {
  --n: 5;
}

.cards span:nth-child(6) {
  --n: 6;
}

.cards span:nth-child(7) {
  --n: 7;
}

.cards span:nth-child(8) {
  --n: 8;
}
.cards span:nth-child(9) {
  --n: 9;
}
.cards span:nth-child(10) {
  --n: 10;
}
.cards span:nth-child(11) {
  --n: 11;
}
.cards span:nth-child(12) {
  --n: 12;
}
.cards span:nth-child(13) {
  --n: 13;
}
.cards span:nth-child(14) {
  --n: 14;
}
.cards span:nth-child(15) {
  --n: 15;
}
.cards span:nth-child(16) {
  --n: 16;
}

.cards span {
  background-color: hsl(calc(360 / 16 * var(--n)), 80%, 70%);
}
.cards:hover span {
  animation: rotating 2s ease-in-out forwards;
}
@keyframes rotating {
  from {
    transform: rotate(0);
  }
  to {
    transform: rotate(calc((var(--n) - 1) * 22.5deg));
  }
}
.search {
  margin-top: 0px;
  margin-right: 20px;
}
.el-icon-arrow-down:before {
  content: none;
}
</style>
